import { ImagePreview } from "vant";

const testList = [
  {
    title: "上月",
    imgs: [
      {
        src:
          "https://img3.doubanio.com/view/group_topic/l/public/p151945196.webp"
      },
      {
        src:
          "https://img1.doubanio.com/view/group_topic/l/public/p151945219.webp"
      },
      {
        src:
          "https://img3.doubanio.com/view/group_topic/l/public/p151945213.webp"
      },
      {
        src:
          "https://img3.doubanio.com/view/group_topic/l/public/p151945213.webp"
      },
      {
        src:
          "https://img3.doubanio.com/view/group_topic/l/public/p151945211.webp"
      },
      {
        src:
          "https://img3.doubanio.com/view/group_topic/l/public/p151945196.webp"
      },
      {
        src:
          "https://img1.doubanio.com/view/group_topic/l/public/p151945219.webp"
      },
      {
        src:
          "https://img3.doubanio.com/view/group_topic/l/public/p151945213.webp"
      },
      {
        src:
          "https://img3.doubanio.com/view/group_topic/l/public/p151945213.webp"
      },
      {
        src:
          "https://img3.doubanio.com/view/group_topic/l/public/p151945211.webp"
      }
    ]
  },
  {
    title: "2018-05-55",
    imgs: [
      {
        src:
          "https://imgsa.baidu.com/forum/w%3D580/sign=1d7137ad6081800a6ee58906813533d6/c97e6a1090ef76c66bc635099116fdfaaf516725.jpg"
      },
      {
        src:
          "https://imgsa.baidu.com/forum/w%3D580/sign=365d41b3c111728b302d8c2af8fcc3b3/7aed1f59d109b3de7bdf2a4ac0bf6c81810a4cd1.jpg"
      },
      {
        src:
          "https://imgsa.baidu.com/forum/w%3D580/sign=1d7137ad6081800a6ee58906813533d6/c97e6a1090ef76c66bc635099116fdfaaf516725.jpg"
      },
      {
        src:
          "https://imgsa.baidu.com/forum/w%3D580/sign=365d41b3c111728b302d8c2af8fcc3b3/7aed1f59d109b3de7bdf2a4ac0bf6c81810a4cd1.jpg"
      },
      {
        src:
          "https://imgsa.baidu.com/forum/w%3D580/sign=1d7137ad6081800a6ee58906813533d6/c97e6a1090ef76c66bc635099116fdfaaf516725.jpg"
      }
    ]
  }
];
export default {
  props: {
    /**
     * [{
     *  title: '',
     *  imgs: [
     *      {
     *          src: ''
     *      }
     *  ]
     * }]
     */
    list: {
      default: [],
      type: Array
    },
    // 0初始状态 1 加载中  2加载完成  3 失败
    status: {
      default: 0,
      type: Number
    }
  },
  data() {
    return {};
  },
  created() {},
  methods: {
    onReview(imgs, index) {
      ImagePreview({
        images: imgs.map(e => e.src),
        startPosition: index,
        onClose: () => {}
      });
    }
    // async initData(){
    //     // let responseBody = await HTTP
    //     // TEST
    //     this.status = 1
    //     setTimeout(() => {
    //         this.list = testList
    //         this.status = 2
    //     }, 1e3)
    // },
  }
};
